﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<BA2009.Web.Controllers.BannerPositionsFormViewModel>" %>
<%@ Import Namespace="MvcContrib.UI.Grid" %>
<%@ Import Namespace="MvcContrib.UI.Grid.ActionSyntax" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Thêm vị trí hiển thị
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <script type="text/javascript" src="../../media/js/jTable-Customize.js"></script>
    
    <script type="text/javascript">
            
           
            $(document).ready(function() {
            customTable("#search_datatable", "#chkBannerPositionID_");
                  
            }
        );
        

        
    </script>
    
    <link href="../../media/css/jtable.css" rel="stylesheet" type="text/css" />


    <h2>Thêm Banner mới</h2>

    <%= Html.ValidationSummary("Create was unsuccessful. Please correct the errors and try again.") %>

    <% using (Html.BeginForm("Create", "BannerPositions", FormMethod.Post, new { id = "mainform" }))
       {%>
       
        <fieldset class="tablewidth">
            <legend>Các Trường Thông Tin Vị Trí Banner</legend>
            
            <p>
                <%= Html.Hidden("PageID",Model.BannerPosition.PageID) %>
            </p>
            
            <p>
                <strong>Code:</strong><br />
                <%=Html.TextBox("Code", Model.BannerPosition.Code)%>
            </p>
            
            <p>
                <strong>Tên Vị Trí:</strong><br />
                <%=Html.TextBox("BannerPositionName", Model.BannerPosition.BannerPositionName)%>
            </p>
            
            <p>
                <strong>Diễn Tả:</strong><br />
                <%=Html.TextBox("Description", Model.BannerPosition.Description)%>
            </p>
            
        
            <fieldset class="tablewidth">
            <legend>Các Banners được chọn</legend>
            <p>
                <div id="search_container">
    <% Html.Grid(Model.Banners).Columns(column =>
           {
               column.For(c => c.BannerID).Attributes(id => "bannerId").Named("Chọn").Action(banner =>
                       {%>
                       <td>
                     
                            <input type="checkbox"   id="chkBannerPositionID_<%= banner.BannerID%>" name="chkBannerPositionID_<%= banner.BannerID%>" />
                           
                       </td>
                       <%
        });
               column.For(c => c.BannerID).Named("ID");
               column.For(c => c.Code).Named("Mã");
               column.For(c => c.BannerName).Named("Tên file");
               
           })
           .Attributes(id => "search_datatable")
           .Render();
                     
            %>
    </div>
            </p>
        </fieldset>
        
            <p>
            <input type="submit" value="Thêm vị trí hiển thị" />
        </p>
        
    </fieldset>

        <%} %>
        
    
    






</asp:Content>
